import Vue from 'vue'
import App from './App.vue'
import router from './router'
//导入element
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//导入百度map
import BaiduMap from 'vue-baidu-map'

import axios from 'axios'

Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'Lr8k4TgkWZ4wUgP8OUTNeiZubN4A4hSc'
})
Vue.use(ElementUI);
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')

//当前项目中只有使用axios发送请求，都对在headers中添加一个toekn:window.localStorage.getItem("token");
axios.interceptors.request.use(config => {
  config.headers.token = window.localStorage.getItem("token");
  return config;
})




